package dao;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import interfaces.IDaoFatura;
import modelos.Fatura;

public class DaoFatura extends DaoGenerico<Fatura> implements IDaoFatura {
	
	public DaoFatura() {
	}
	
	public Fatura getPorId(int id) 
	{
		Criteria criteria = this.getCriteria();
		criteria.add(Restrictions.eq("id", id));
		Fatura a = (Fatura) criteria.uniqueResult();
		return a;
	}
}
